<template>
    <div class="login1">
        <h2>{{globalTitle}}</h2>
        <div class="login_wapper">
            <div class="title">登录</div>
            <div class="login_form">
                <div class="row">
                    <div class="key">账号：</div>
                    <input type="text" placeholder="请输入账号" v-model="form.username">
                </div>
                <div class="row">
                    <div class="key">密码：</div>
                    <input type="password" placeholder="请输入密码" v-model="form.password">
                </div>
            </div>
            <p style="text-align: center">没有账号?<span @click="toRegister">去注册</span></p>
            <div class="long-btn" @click="login">登&nbsp;&nbsp;&nbsp;&nbsp;录</div>
        </div>
    </div>
</template>
<script setup lang="ts">
import {ref, reactive, defineProps} from 'vue'
import {ElMessage} from "element-plus";
import { useLoginFunctions } from '/@/components/hzsystem/LoginPublicFuncation';
const { form, globalTitle, handleLogin, toRegister } = useLoginFunctions();

const props = defineProps({
    loginAPI: {
        default: '',
        type: String
    }
})


function login(){
    if(!form.username){
        ElMessage({
            message: '请输入账号',
            type: 'warning',
            duration: 2000
        })
        return
    }
    if(!form.password){
        ElMessage({
            message: '请输入密码',
            type: 'warning',
            duration: 2000
        })
        return
    }
}

</script>
<style scoped lang="scss">
@import "./style.scss";
</style>